/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.datasets.web.controller.manager;


import com.medusa.gruul.common.core.util.Result;
import com.medusa.gruul.datasets.service.IDcShopRankingService;
import com.medusa.gruul.datasets.web.model.RankingsGMVVo;
import com.medusa.gruul.datasets.web.model.RankingsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 交易统计表 前端控制器
 * </p>
 *
 * @author xiaoq
 * @since 2020-05-06
 */
@RestController
@RequestMapping("/dc-shop-ranking")
public class DcShopRankingController {

	@Autowired
	private IDcShopRankingService dcShopRankingService;


	/**
	 * 获取城市合伙人 交易量排行榜信息
	 *
	 * @return 城市合伙人 交易量排行榜信息
	 */
	@GetMapping("get/rankingsInfo")
	public Result<RankingsVo> getRankingsInfo() {
		RankingsVo rankingsInfo = dcShopRankingService.getRankingsInfos();
		return Result.ok(rankingsInfo);
	}


	/**
	 * 获取城市合伙人 交易额排行榜信息
	 *
	 * @return 城市合伙人 交易额排行榜信息
	 */
	@GetMapping("get/rankingsGVMInfo")
	public Result<RankingsGMVVo> getRankingsGVMInfo() {
		RankingsGMVVo rankingsGVMInfos = dcShopRankingService.getRankingsGVMInfos();
		return Result.ok(rankingsGVMInfos);
	}


}
